//
//  SearchReGeocodeResultModel.h
//  o_amap
//
//  Created by Q神 on 2021/4/19.
//

#import <Foundation/Foundation.h>
#import <AMapSearchKit/AMapSearchKit.h>
#import "LatLngModel.h"
#import "SearchMapPoiModel.h"

@class RegeocodeAddressModel;
@class RegeocodeQueryModel;
@class AoiModel;
@class BusinessAreasModel;
@class CrossroadModel;
@class RoadModel;
@class StreetNumberModel;

NS_ASSUME_NONNULL_BEGIN

@interface SearchReGeocodeResultModel : NSObject

@property (nonatomic, strong) RegeocodeAddressModel *regeocodeAddress;
@property (nonatomic, strong) RegeocodeQueryModel *regeocodeQuery;

+ (SearchReGeocodeResultModel *)createSearchReGeocodeResultModelWithResponse:(AMapReGeocodeSearchResponse *)response;

@end


@interface RegeocodeAddressModel : NSObject

@property (nonatomic, copy) NSString *adCode;
@property (nonatomic, strong) NSArray<AoiModel *> *aois;
@property (nonatomic, copy) NSString *building;
@property (nonatomic, strong) NSArray<BusinessAreasModel *> *businessAreas;
@property (nonatomic, copy) NSString *city;
@property (nonatomic, copy) NSString *cityCode;
@property (nonatomic, copy) NSString *country;
@property (nonatomic, copy) NSString *countryCode;
@property (nonatomic, strong) NSArray<CrossroadModel *> *crossroads;
@property (nonatomic, copy) NSString *district;
@property (nonatomic, copy) NSString *formatAddress;
@property (nonatomic, copy) NSString *neighborhood;
@property (nonatomic, strong) NSArray<SearchMapPoiModel *> *pois;
@property (nonatomic, copy) NSString *province;
@property (nonatomic, strong) NSArray<RoadModel *> *roads;
@property (nonatomic, strong) StreetNumberModel *streetNumber;
@property (nonatomic, copy) NSString *towncode;
@property (nonatomic, copy) NSString *township;

+ (RegeocodeAddressModel *)createRegeocodeAddressModelWithResponse:(AMapReGeocodeSearchResponse *)response;

@end


@interface RegeocodeQueryModel : NSObject

@property (nonatomic, copy) NSString *latLonType;
@property (nonatomic, copy) NSString *poiType;
@property (nonatomic, strong) LatLngModel *point;
@property (nonatomic, assign) NSInteger radius;

+ (RegeocodeQueryModel *)createRegeocodeQueryModelWithResponse:(AMapReGeocodeSearchResponse *)response;

@end


@interface AoiModel : NSObject

@property (nonatomic, copy) NSString *adCode;
@property (nonatomic, assign) NSInteger aoiArea;
@property (nonatomic, copy) LatLngModel *aoiCenterPoint;
@property (nonatomic, copy) NSString *aoiId;
@property (nonatomic, copy) NSString *aoiName;

@end


@interface BusinessAreasModel : NSObject

@property (nonatomic, copy) NSString *name;
@property (nonatomic, strong) LatLngModel *centerPoint;

+ (NSArray<BusinessAreasModel *> *)createBusinessAreasModelWithArray:(NSArray<AMapBusinessArea *> *)businessAreas;

@end


@interface CrossroadModel : NSObject

@property (nonatomic, strong) LatLngModel *centerPoint;
@property (nonatomic, copy) NSString *direction;
@property (nonatomic, assign) NSInteger distance;
@property (nonatomic, copy) NSString *firstRoadId;
@property (nonatomic, copy) NSString *firstRoadName;
@property (nonatomic, copy) NSString *ID;//id
@property (nonatomic, assign) NSInteger roadWidth;
@property (nonatomic, copy) NSString *secondRoadId;
@property (nonatomic, copy) NSString *secondRoadName;

@end


@interface RoadModel : NSObject

@property (nonatomic, copy) NSString *direction;
@property (nonatomic, assign) NSInteger distance;
@property (nonatomic, copy) NSString *ID;//id
@property (nonatomic, copy) LatLngModel *latLngPoint;
@property (nonatomic, copy) NSString *name;

@end


@interface StreetNumberModel : NSObject

@property (nonatomic, copy) NSString *direction;
@property (nonatomic, assign) NSInteger distance;
@property (nonatomic, strong) LatLngModel *latLonPoint;
@property (nonatomic, copy) NSString *number;
@property (nonatomic, copy) NSString *street;

+ (StreetNumberModel *)createStreetNumberModelWithData:(AMapStreetNumber *)streetNumber;

@end

NS_ASSUME_NONNULL_END
